import send from '../http'

export default {
  getThirdthAppList (data) {
    let req = {
      data: data,
      action: 'thirdPartyApp/getAppType'
    }
    return send.fentchByRobot(req, 'post')
  },
  /**
   * 获取第三方接口列表
   * @param data {type: ''}
   */
  getListByAppType (data) {
    let req = {
      data: data,
      action: 'thirdPartyApp/getConfigListByAppType'
    }
    return send.fentchByRobot(req, 'post')
  },
  /**
   * 添加第三方接口
   * @param data {type: ''}
   */
  addThirdAppConfig (data) {
    let req = {
      data: data,
      action: 'thirdPartyApp/addConfig'
    }
    return send.fentchByRobot(req, 'post')
  },
  /**
   * 编辑第三方接口
   * @param data {type: ''}
   */
  updateThirdAppConfig (data) {
    let req = {
      data: data,
      action: 'thirdPartyApp/updateConfig'
    }
    return send.fentchByRobot(req, 'post')
  },
  /**
   * 删除第三方接口
   * @param data {type: ''}
   */
  deleteThirdAppConfig (data) {
    let req = {
      data: data,
      action: 'thirdPartyApp/delConfig'
    }
    return send.fentchByRobot(req, 'post')
  },
  /**
   * 获取第三方应用列表
   * @param data {type: ''}
   */
  getApplications (data) {
    let req = {
      data: data,
      action: 'thirdPartyApp/getApplications'
    }
    return send.fentchByRobot(req, 'post')
  }
}
